package com.study.favorite.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface TagFavoriteMapper {

    @Insert("insert into tagfavorite values(#{tid},#{fid})")
    void insert (@Param("tid") Integer tid,@Param("fid") Integer fid);

    @Insert("insert into tagfavorite select tid,  #{fid} from tag where tname=#{tname}")
    void insertByTname(@Param("tname") String name, @Param("fid") Integer fid);
}
